﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RemotingLibs.TradeClass;

namespace RemotingLibs.QuoteClass
{
    [Serializable]
    public enum TdxFun
    {
        TdxL2Hq_LastDay = 1,//参数为空
        TdxL2Hq_GetStkInfo,
        TdxL2Hq_GetBSQueue,//Stkcode
        TdxL2Hq_Quotes,//Stk80
        TdxL2Hq_GetTransactionData,//StkCode，Date
        TdxL2Hq_GetMinuteTimeData,//StkCode，Date
        TdxL2Hq_GetKLineData,//StkCode, NCount, Type);
        TdxL2Hq_GetDetailTransactionData,//StkCode,Date
        TdxL2Hq_GetDetailOrderData,//StkCode
        Tdx_SendOrder,
        Tdx_CancelOrder,
        Tdx_QueryAsset,
        Tdx_QueryAccountInfo,
        Tdx_QueryPosition,
        Tdx_QueryOrderField,
        Tdx_QueryTradeField,
        
        Get_RemoteAccount,
        
        //l1行情api
        //获取分时数据
        TdxL1Hq_GetMinuteTimeData,
        //获取截面行情
        TdxL1Hq_GetAllQuote,
        //设置高速行情轮询股票池
        TdxL1Hq_SetFasterStkList
    }
    
    [Serializable]
    public class ReqTdx
    {
        public string StkCode { get; set; }
        public short NCount { get; set; }
        public int Date { get; set; }
        public List<string> StkList { get; set; }
        public byte Type { get; set; }
    }

    [Serializable]
    public class ReqThs
    {
        public string StkCode { get; set; }
        public decimal Price { get; set; }
        public int Date { get; set; }
        public byte Type { get; set; }
    }


    [Serializable]
    public class ReqTdxTrade
    {
       public string Account { get; set; }
       public  ReqTdxTradeOrder Order { get; set; }
       public ReqTdxTradeOrderCancel OrderCancel { get; set; }
    }


    [Serializable]
    public class ReqTdxTradeOrder
    {
        public string StkCode { get; set; }
        public float Price { get; set; }
        public int Quantity { get; set; }
        /// <summary>
        /// 表示报价方式 0  上海限价委托 深圳限价委托 1深圳对方最优价格  2深圳本方最优价格  3深圳即时成交剩余撤销  4上海五档即成剩撤 深圳五档即成剩撤 5深圳全额成交或撤销 6上海五档即成转限价
        /// </summary>
        public int PriceType { get; set; }
        /// <summary>
        /// 表示委托的种类，0买入 1卖出  2融资买入  3融券卖出   4买券还券   5卖券还款  6现券还券
        /// </summary>
        public int Category { get; set; }
    }
    [Serializable]
    public class ReqTdxTradeOrderCancel
    {
        public string StkCode { get; set; }        
        public string OrderId { get; set; }
    }

    [Serializable]
    public class TdxTradeReqCancelOrder
    {
        public string StkCode { get; set; }
        public float Price { get; set; }
        public int Quantity { get; set; }
        public int PriceType { get; set; }
        public int Category { get; set; }
    }



}
